home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / imglib2 / imgIContainer.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  13KB  |  355 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM imgIContainer.idl
  3.  */
  4.  
  5. #ifndef __gen_imgIContainer_h__
  6. #define __gen_imgIContainer_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_gfxtypes_h__
  14. #include "gfxtypes.h"
  15. #endif
  16.  
  17. #ifndef __gen_gfxIFormats_h__
  18. #include "gfxIFormats.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. class gfxIImageFrame; /* forward declaration */
  26.  
  27. class imgIContainerObserver; /* forward declaration */
  28.  
  29.  
  30. /* starting interface:    imgIContainer */
  31. #define IMGICONTAINER_IID_STR "1a6290e6-8285-4e10-963d-d001f8d327b8"
  32.  
  33. #define IMGICONTAINER_IID \
  34.   {0x1a6290e6, 0x8285, 0x4e10, \
  35.     { 0x96, 0x3d, 0xd0, 0x01, 0xf8, 0xd3, 0x27, 0xb8 }}
  36.  
  37. /**
  38.  * gfxIImageContainer interface
  39.  *
  40.  * @author Stuart Parmenter <pavlov@netscape.com>
  41.  * @version 0.1
  42.  * @see "gfx2"
  43.  */
  44. class NS_NO_VTABLE imgIContainer : public nsISupports {
  45.  public: 
  46.  
  47.   NS_DEFINE_STATIC_IID_ACCESSOR(IMGICONTAINER_IID)
  48.  
  49.   /**
  50.    * Create a new \a aWidth x \a aHeight sized image container.
  51.    *
  52.    * @param aWidth The width of the container in which all the
  53.    *               gfxIImageFrame children will fit.
  54.    * @param aHeight The height of the container in which all the
  55.    *                gfxIImageFrame children will fit.
  56.    * @param aObserver Observer to send animation notifications to.
  57.    */
  58.   /* void init (in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver); */
  59.   NS_IMETHOD Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver *aObserver) = 0;
  60.  
  61.   /* readonly attribute gfx_format preferredAlphaChannelFormat; */
  62.   NS_IMETHOD GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat) = 0;
  63.  
  64.   /**
  65.    * The width of the container rectangle.
  66.    */
  67.   /* readonly attribute PRInt32 width; */
  68.   NS_IMETHOD GetWidth(PRInt32 *aWidth) = 0;
  69.  
  70.   /**
  71.    * The height of the container rectangle.
  72.    */
  73.   /* readonly attribute PRInt32 height; */
  74.   NS_IMETHOD GetHeight(PRInt32 *aHeight) = 0;
  75.  
  76.   /**
  77.    * Get the current frame that would be drawn if the image was to be drawn now
  78.    */
  79.   /* readonly attribute gfxIImageFrame currentFrame; */
  80.   NS_IMETHOD GetCurrentFrame(gfxIImageFrame * *aCurrentFrame) = 0;
  81.  
  82.   /* readonly attribute unsigned long numFrames; */
  83.   NS_IMETHOD GetNumFrames(PRUint32 *aNumFrames) = 0;
  84.  
  85.   /**
  86.    * Animation mode Constants
  87.    *   0 = normal
  88.    *   1 = don't animate
  89.    *   2 = loop once
  90.    */
  91.   enum { kNormalAnimMode = 0 };
  92.  
  93.   enum { kDontAnimMode = 1 };
  94.  
  95.   enum { kLoopOnceAnimMode = 2 };
  96.  
  97.   /* attribute unsigned short animationMode; */
  98.   NS_IMETHOD GetAnimationMode(PRUint16 *aAnimationMode) = 0;
  99.   NS_IMETHOD SetAnimationMode(PRUint16 aAnimationMode) = 0;
  100.  
  101.   /* gfxIImageFrame getFrameAt (in unsigned long index); */
  102.   NS_IMETHOD GetFrameAt(PRUint32 index, gfxIImageFrame **_retval) = 0;
  103.  
  104.   /**
  105.    * Adds \a item to the end of the list of frames.
  106.    * @param item frame to add.
  107.    */
  108.   /* void appendFrame (in gfxIImageFrame item); */
  109.   NS_IMETHOD AppendFrame(gfxIImageFrame *item) = 0;
  110.  
  111.   /* void removeFrame (in gfxIImageFrame item); */
  112.   NS_IMETHOD RemoveFrame(gfxIImageFrame *item) = 0;
  113.  
  114.   /* void endFrameDecode (in unsigned long framenumber, in unsigned long timeout); */
  115.   NS_IMETHOD EndFrameDecode(PRUint32 framenumber, PRUint32 timeout) = 0;
  116.  
  117.   /* void decodingComplete (); */
  118.   NS_IMETHOD DecodingComplete(void) = 0;
  119.  
  120.   /* void clear (); */
  121.   NS_IMETHOD Clear(void) = 0;
  122.  
  123.   /* void startAnimation (); */
  124.   NS_IMETHOD StartAnimation(void) = 0;
  125.  
  126.   /* void stopAnimation (); */
  127.   NS_IMETHOD StopAnimation(void) = 0;
  128.  
  129.   /* void resetAnimation (); */
  130.   NS_IMETHOD ResetAnimation(void) = 0;
  131.  
  132.   /**
  133.    * number of times to loop the image.
  134.    * @note -1 means forever.
  135.    */
  136.   /* attribute long loopCount; */
  137.   NS_IMETHOD GetLoopCount(PRInt32 *aLoopCount) = 0;
  138.   NS_IMETHOD SetLoopCount(PRInt32 aLoopCount) = 0;
  139.  
  140. };
  141.  
  142. /* Use this macro when declaring classes that implement this interface. */
  143. #define NS_DECL_IMGICONTAINER \
  144.   NS_IMETHOD Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver *aObserver); \
  145.   NS_IMETHOD GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat); \
  146.   NS_IMETHOD GetWidth(PRInt32 *aWidth); \
  147.   NS_IMETHOD GetHeight(PRInt32 *aHeight); \
  148.   NS_IMETHOD GetCurrentFrame(gfxIImageFrame * *aCurrentFrame); \
  149.   NS_IMETHOD GetNumFrames(PRUint32 *aNumFrames); \
  150.   NS_IMETHOD GetAnimationMode(PRUint16 *aAnimationMode); \
  151.   NS_IMETHOD SetAnimationMode(PRUint16 aAnimationMode); \
  152.   NS_IMETHOD GetFrameAt(PRUint32 index, gfxIImageFrame **_retval); \
  153.   NS_IMETHOD AppendFrame(gfxIImageFrame *item); \
  154.   NS_IMETHOD RemoveFrame(gfxIImageFrame *item); \
  155.   NS_IMETHOD EndFrameDecode(PRUint32 framenumber, PRUint32 timeout); \
  156.   NS_IMETHOD DecodingComplete(void); \
  157.   NS_IMETHOD Clear(void); \
  158.   NS_IMETHOD StartAnimation(void); \
  159.   NS_IMETHOD StopAnimation(void); \
  160.   NS_IMETHOD ResetAnimation(void); \
  161.   NS_IMETHOD GetLoopCount(PRInt32 *aLoopCount); \
  162.   NS_IMETHOD SetLoopCount(PRInt32 aLoopCount); 
  163.  
  164. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  165. #define NS_FORWARD_IMGICONTAINER(_to) \
  166.   NS_IMETHOD Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver *aObserver) { return _to Init(aWidth, aHeight, aObserver); } \
  167.   NS_IMETHOD GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat) { return _to GetPreferredAlphaChannelFormat(aPreferredAlphaChannelFormat); } \
  168.   NS_IMETHOD GetWidth(PRInt32 *aWidth) { return _to GetWidth(aWidth); } \
  169.   NS_IMETHOD GetHeight(PRInt32 *aHeight) { return _to GetHeight(aHeight); } \
  170.   NS_IMETHOD GetCurrentFrame(gfxIImageFrame * *aCurrentFrame) { return _to GetCurrentFrame(aCurrentFrame); } \
  171.   NS_IMETHOD GetNumFrames(PRUint32 *aNumFrames) { return _to GetNumFrames(aNumFrames); } \
  172.   NS_IMETHOD GetAnimationMode(PRUint16 *aAnimationMode) { return _to GetAnimationMode(aAnimationMode); } \
  173.   NS_IMETHOD SetAnimationMode(PRUint16 aAnimationMode) { return _to SetAnimationMode(aAnimationMode); } \
  174.   NS_IMETHOD GetFrameAt(PRUint32 index, gfxIImageFrame **_retval) { return _to GetFrameAt(index, _retval); } \
  175.   NS_IMETHOD AppendFrame(gfxIImageFrame *item) { return _to AppendFrame(item); } \
  176.   NS_IMETHOD RemoveFrame(gfxIImageFrame *item) { return _to RemoveFrame(item); } \
  177.   NS_IMETHOD EndFrameDecode(PRUint32 framenumber, PRUint32 timeout) { return _to EndFrameDecode(framenumber, timeout); } \
  178.   NS_IMETHOD DecodingComplete(void) { return _to DecodingComplete(); } \
  179.   NS_IMETHOD Clear(void) { return _to Clear(); } \
  180.   NS_IMETHOD StartAnimation(void) { return _to StartAnimation(); } \
  181.   NS_IMETHOD StopAnimation(void) { return _to StopAnimation(); } \
  182.   NS_IMETHOD ResetAnimation(void) { return _to ResetAnimation(); } \
  183.   NS_IMETHOD GetLoopCount(PRInt32 *aLoopCount) { return _to GetLoopCount(aLoopCount); } \
  184.   NS_IMETHOD SetLoopCount(PRInt32 aLoopCount) { return _to SetLoopCount(aLoopCount); } 
  185.  
  186. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  187. #define NS_FORWARD_SAFE_IMGICONTAINER(_to) \
  188.   NS_IMETHOD Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aWidth, aHeight, aObserver); } \
  189.   NS_IMETHOD GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredAlphaChannelFormat(aPreferredAlphaChannelFormat); } \
  190.   NS_IMETHOD GetWidth(PRInt32 *aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \
  191.   NS_IMETHOD GetHeight(PRInt32 *aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \
  192.   NS_IMETHOD GetCurrentFrame(gfxIImageFrame * *aCurrentFrame) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentFrame(aCurrentFrame); } \
  193.   NS_IMETHOD GetNumFrames(PRUint32 *aNumFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumFrames(aNumFrames); } \
  194.   NS_IMETHOD GetAnimationMode(PRUint16 *aAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimationMode(aAnimationMode); } \
  195.   NS_IMETHOD SetAnimationMode(PRUint16 aAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAnimationMode(aAnimationMode); } \
  196.   NS_IMETHOD GetFrameAt(PRUint32 index, gfxIImageFrame **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrameAt(index, _retval); } \
  197.   NS_IMETHOD AppendFrame(gfxIImageFrame *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendFrame(item); } \
  198.   NS_IMETHOD RemoveFrame(gfxIImageFrame *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFrame(item); } \
  199.   NS_IMETHOD EndFrameDecode(PRUint32 framenumber, PRUint32 timeout) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndFrameDecode(framenumber, timeout); } \
  200.   NS_IMETHOD DecodingComplete(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodingComplete(); } \
  201.   NS_IMETHOD Clear(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(); } \
  202.   NS_IMETHOD StartAnimation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartAnimation(); } \
  203.   NS_IMETHOD StopAnimation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StopAnimation(); } \
  204.   NS_IMETHOD ResetAnimation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetAnimation(); } \
  205.   NS_IMETHOD GetLoopCount(PRInt32 *aLoopCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoopCount(aLoopCount); } \
  206.   NS_IMETHOD SetLoopCount(PRInt32 aLoopCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoopCount(aLoopCount); } 
  207.  
  208. #if 0
  209. /* Use the code below as a template for the implementation class for this interface. */
  210.  
  211. /* Header file */
  212. class _MYCLASS_ : public imgIContainer
  213. {
  214. public:
  215.   NS_DECL_ISUPPORTS
  216.   NS_DECL_IMGICONTAINER
  217.  
  218.   _MYCLASS_();
  219.  
  220. private:
  221.   ~_MYCLASS_();
  222.  
  223. protected:
  224.   /* additional members */
  225. };
  226.  
  227. /* Implementation file */
  228. NS_IMPL_ISUPPORTS1(_MYCLASS_, imgIContainer)
  229.  
  230. _MYCLASS_::_MYCLASS_()
  231. {
  232.   /* member initializers and constructor code */
  233. }
  234.  
  235. _MYCLASS_::~_MYCLASS_()
  236. {
  237.   /* destructor code */
  238. }
  239.  
  240. /* void init (in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver); */
  241. NS_IMETHODIMP _MYCLASS_::Init(PRInt32 aWidth, PRInt32 aHeight, imgIContainerObserver *aObserver)
  242. {
  243.     return NS_ERROR_NOT_IMPLEMENTED;
  244. }
  245.  
  246. /* readonly attribute gfx_format preferredAlphaChannelFormat; */
  247. NS_IMETHODIMP _MYCLASS_::GetPreferredAlphaChannelFormat(gfx_format *aPreferredAlphaChannelFormat)
  248. {
  249.     return NS_ERROR_NOT_IMPLEMENTED;
  250. }
  251.  
  252. /* readonly attribute PRInt32 width; */
  253. NS_IMETHODIMP _MYCLASS_::GetWidth(PRInt32 *aWidth)
  254. {
  255.     return NS_ERROR_NOT_IMPLEMENTED;
  256. }
  257.  
  258. /* readonly attribute PRInt32 height; */
  259. NS_IMETHODIMP _MYCLASS_::GetHeight(PRInt32 *aHeight)
  260. {
  261.     return NS_ERROR_NOT_IMPLEMENTED;
  262. }
  263.  
  264. /* readonly attribute gfxIImageFrame currentFrame; */
  265. NS_IMETHODIMP _MYCLASS_::GetCurrentFrame(gfxIImageFrame * *aCurrentFrame)
  266. {
  267.     return NS_ERROR_NOT_IMPLEMENTED;
  268. }
  269.  
  270. /* readonly attribute unsigned long numFrames; */
  271. NS_IMETHODIMP _MYCLASS_::GetNumFrames(PRUint32 *aNumFrames)
  272. {
  273.     return NS_ERROR_NOT_IMPLEMENTED;
  274. }
  275.  
  276. /* attribute unsigned short animationMode; */
  277. NS_IMETHODIMP _MYCLASS_::GetAnimationMode(PRUint16 *aAnimationMode)
  278. {
  279.     return NS_ERROR_NOT_IMPLEMENTED;
  280. }
  281. NS_IMETHODIMP _MYCLASS_::SetAnimationMode(PRUint16 aAnimationMode)
  282. {
  283.     return NS_ERROR_NOT_IMPLEMENTED;
  284. }
  285.  
  286. /* gfxIImageFrame getFrameAt (in unsigned long index); */
  287. NS_IMETHODIMP _MYCLASS_::GetFrameAt(PRUint32 index, gfxIImageFrame **_retval)
  288. {
  289.     return NS_ERROR_NOT_IMPLEMENTED;
  290. }
  291.  
  292. /* void appendFrame (in gfxIImageFrame item); */
  293. NS_IMETHODIMP _MYCLASS_::AppendFrame(gfxIImageFrame *item)
  294. {
  295.     return NS_ERROR_NOT_IMPLEMENTED;
  296. }
  297.  
  298. /* void removeFrame (in gfxIImageFrame item); */
  299. NS_IMETHODIMP _MYCLASS_::RemoveFrame(gfxIImageFrame *item)
  300. {
  301.     return NS_ERROR_NOT_IMPLEMENTED;
  302. }
  303.  
  304. /* void endFrameDecode (in unsigned long framenumber, in unsigned long timeout); */
  305. NS_IMETHODIMP _MYCLASS_::EndFrameDecode(PRUint32 framenumber, PRUint32 timeout)
  306. {
  307.     return NS_ERROR_NOT_IMPLEMENTED;
  308. }
  309.  
  310. /* void decodingComplete (); */
  311. NS_IMETHODIMP _MYCLASS_::DecodingComplete()
  312. {
  313.     return NS_ERROR_NOT_IMPLEMENTED;
  314. }
  315.  
  316. /* void clear (); */
  317. NS_IMETHODIMP _MYCLASS_::Clear()
  318. {
  319.     return NS_ERROR_NOT_IMPLEMENTED;
  320. }
  321.  
  322. /* void startAnimation (); */
  323. NS_IMETHODIMP _MYCLASS_::StartAnimation()
  324. {
  325.     return NS_ERROR_NOT_IMPLEMENTED;
  326. }
  327.  
  328. /* void stopAnimation (); */
  329. NS_IMETHODIMP _MYCLASS_::StopAnimation()
  330. {
  331.     return NS_ERROR_NOT_IMPLEMENTED;
  332. }
  333.  
  334. /* void resetAnimation (); */
  335. NS_IMETHODIMP _MYCLASS_::ResetAnimation()
  336. {
  337.     return NS_ERROR_NOT_IMPLEMENTED;
  338. }
  339.  
  340. /* attribute long loopCount; */
  341. NS_IMETHODIMP _MYCLASS_::GetLoopCount(PRInt32 *aLoopCount)
  342. {
  343.     return NS_ERROR_NOT_IMPLEMENTED;
  344. }
  345. NS_IMETHODIMP _MYCLASS_::SetLoopCount(PRInt32 aLoopCount)
  346. {
  347.     return NS_ERROR_NOT_IMPLEMENTED;
  348. }
  349.  
  350. /* End of implementation class template. */
  351. #endif
  352.  
  353.  
  354. #endif /* __gen_imgIContainer_h__ */
  355.